<html>
<head>
  <title>CentOS 6.2上安装部署 Cobbler</title>
  <basefont face="Tahoma" size="2" />
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <meta name="exporter-version" content="Evernote Windows/271962; Windows/6.1.7600;"/>
  <style>
    body, td {
      font-family: Tahoma;
      font-size: 10pt;
    }
  </style>
</head>
<body>
<a name="291"/>
<h1>CentOS 6.2上安装部署 Cobbler</h1>

<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><font face="微软雅黑">简介：<br/></font><div><font face="微软雅黑">          Cobbler 是一个系统启动服务（boot server），可以通过网络启动（PXE）的方式用来快速安装、重装物理服务器和虚拟机，支持安装不同的 Linux 发行版和 Windows. Cobbler 是个轻量级 Python 程序，总共大概1.5万行代码，还可以用来管理 DHCP, DNS, yum 源等。Cobbler 使用命令行方式管理，也提供了基于 Web 的界面管理工具（cobbler-web），不过命令行方式已经很方便，实在没有必要为了不实用的 Web 界面再添加一个 Web 服务器。</font></div><div><hr/><font face="微软雅黑"><font color="#328712">cobbler 命令说明：</font><br/></font><table border="1" cellpadding="2" cellspacing="0" width="40%"><tbody><tr><td valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">命令名称</font></span></b></td><td style="text-align: left;" valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">命令用途</font></span></b></td></tr><tr><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">cobbler check</font></span></td><td style="text-align: left;" valign="top"><div><span style="line-height: 24px; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">检查cobbler配置</font></span></div></td></tr><tr><td valign="top"><font color="#FF0000" face="微软雅黑"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);">c</span><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);">obbl</span><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);">er list</span></font></td><td style="text-align: left;" valign="top"><div><span style="line-height: 24px; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">检查cobbler配置</font></span></div></td></tr><tr><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">cobbler report</font></span></td><td style="text-align: left;" valign="top"><div><span style="line-height: 24px; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">列出元素的详细信息</font></span></div></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">cobbler distro</font></span></td><td valign="top"><div><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">查看导入的发行版系统信息</font></span></div></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">cobbler system</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">查看添加的系统信息</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">cobbler profile</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">查看配置信息</font></span></td></tr><tr><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">cobbler sync</font></span></td><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">同步Cobbler配置，更改配置最好都要执行下</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">cobbler reposync</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">同步yum仓库</font></span></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div><div style="text-align: left; padding: 0px; margin: 0px; background-color: rgb(255, 255, 255);"><b style="line-height: 28px; padding: 0px; margin: 0px;"><font color="#328712" face="微软雅黑" size="3" style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><a name="_Toc294257633" style="text-decoration: underline;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">Cobbler</span></a><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">配置文件说明：</span></font></b></div><div style="text-align: left; padding: 0px; margin: 0px; background-color: rgb(255, 255, 255);"><table border="1" cellpadding="2" cellspacing="0" style="color: rgb(44, 44, 44);" width="40%"><tbody><tr><td valign="top"><b style="line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">配置文件名称</font></span></b></td><td valign="top"><b style="line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">作<span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;">    </span>用</font></span></b></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/settings</font></span></td><td valign="top"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">Cobbler</span><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">主配置文件</span></font></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/users.digest</font></span></td><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">用于web访问的用户名密码配置文件</font></span></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/modules.conf</font></span></td><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">模块配置文件</font></span></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/users.conf</font></span></td><td valign="top"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">Cobbler WebUI/Web </span><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">服务授权配置文件</span></font></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/iso/</font></span></td><td valign="top"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">Buildiso </span><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">模板配置文件</span></font></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/power</font></span></td><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">电源配置文件</font></span></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler/pxe</font></span></td><td valign="top"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">Pxeprofile</span><span style="word-wrap: normal; word-break: normal; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">配置模板</span></font></td></tr><tr><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">/etc/cobbler</font></span></td><td valign="top"><span style="background-color: rgb(234, 241, 221);"><font face="微软雅黑">此目录也包含rsync、dhcp、dns、pxe、dnsmasq等服务的模板配置文件</font></span></td></tr></tbody></table><div><b style="line-height: 28px; padding: 0px; margin: 0px;"><font color="#328712" face="微软雅黑" size="3" style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">系统镜像数据目录/var/www/cobbler</span></font></b></div></div><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(255, 255, 255);"><font face="微软雅黑">导入的系统发行版，repos镜像和kickstart文件都放置在/var/www/cobbler目录下。确保/var目录有足够的空间来存储这些文件</font></span></div><div><table border="1" cellpadding="2" cellspacing="0" width="40%"><tbody><tr><td valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">目录名称</font></span></b></td><td valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">作<span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;">    </span>用</font></span></b></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/www/cobbler/images/</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">存储所有导入发行版的Kernel和initrd镜像用于远程网络启动</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/www/cobbler/ks_mirror/</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">存储导入的发行版系统数据</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/www/cobbler/repo_mirror/</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">仓库存储目录</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/log/cobbler</font></span></td><td valign="top"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; line-height: 24px; color: rgb(44, 44, 44); text-align: left; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">Cobbler</span><span style="word-wrap: normal; word-break: normal; line-height: 24px; color: rgb(44, 44, 44); text-align: left; background-color: rgb(234, 241, 221); padding: 0px; margin: 0px;">日志文件 cobbler.log install.lo</span></font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div><div><b style="line-height: 28px; text-align: left; padding: 0px; margin: 0px;"><font color="#328712" face="微软雅黑" size="3" style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">Cobbler</span><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">数据目录<a name="OLE_LINK29" style="text-decoration: underline;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;">/var/lib/cobbler</span></a></span></font></b></div><div><b style="color: rgb(44, 44, 44); line-height: 28px; text-align: left; padding: 0px; margin: 0px;"><font face="微软雅黑" size="3" style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;"><a name="OLE_LINK29" style="text-decoration: underline; color: rgb(74, 74, 48);"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;"><span style="color: rgb(44, 44, 44); background-color: rgb(255, 255, 255);">此目录存储和Cobbler profiles、systems、distros相关的配置。</span></span></a></span></font></b></div><div><table border="1" cellpadding="2" cellspacing="0" width="40%"><tbody><tr><td valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">目录名称</font></span></b></td><td valign="top"><b style="color: rgb(44, 44, 44); line-height: 18px; text-align: -webkit-center; background-color: rgb(204, 192, 217); padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><font face="微软雅黑">作 <span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;">   </span>用</font></span></b></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/lib/cobbler/config/</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">存放distros、repos、systems和profiles等信息配置文件，一般都是json文件</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/lib/cobbler/snippets/</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">存放ks文件可以导入的脚本小片段，值得研究</font></span></td></tr><tr><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">/var/lib/cobbler/triggers</font></span></td><td valign="top"><span style="color: rgb(44, 44, 44); line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font face="微软雅黑">存放用户定义的cobbler 命令</font></span></td></tr><tr><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">/var/lib/cobbler/kickstarts/</font></span></td><td valign="top"><span style="line-height: 24px; text-align: left; background-color: rgb(234, 241, 221);"><font color="#FF0000" face="微软雅黑">存放kickstart配置文件</font></span></td></tr></tbody></table><div><b style="color: rgb(44, 44, 44); line-height: 28px; text-align: left; padding: 0px; margin: 0px;"><font face="微软雅黑" style="word-wrap: normal; word-break: normal; line-height: 19px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px; font-weight: normal;"><br/></span></font></b><table border="1" cellpadding="2" cellspacing="0" width="60%"><tbody><tr><td valign="top"><b style="line-height: 28px; padding: 0px; margin: 0px;"><font face="微软雅黑" style="word-wrap: normal; word-break: normal; line-height: 19px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px; font-weight: normal;">从DVD中导入OS数据</span></font></b></td></tr><tr><td valign="top"><font face="微软雅黑">cobbler import --path=/var/os/Linux/Centos/x86_64/Centos5.8/dvd --name=centos5.8 --arch=x86_64</font></td></tr></tbody></table><div><b style="color: rgb(44, 44, 44); line-height: 28px; text-align: left; padding: 0px; margin: 0px;"><font face="微软雅黑"><br/></font></b></div><div><table border="1" cellpadding="2" cellspacing="0" width="60%"><tbody><tr><td valign="top"><b style="line-height: 28px; padding: 0px; margin: 0px;"><font face="微软雅黑"><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px; font-weight: normal;"> </span><span style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px; font-weight: normal;"><font size="3">删除导入的系统</font></span></font></b></td></tr><tr><td valign="top"><font face="微软雅黑">cobbler profile remove --name CentOS-6.2-bin-DVD1-Centos6.2-x86_64</font></td></tr><tr><td valign="top"><font face="微软雅黑">cobbler distro remove --name CentOS-6.2-bin-DVD1-Centos6.2-x86_64<br/></font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><font face="微软雅黑">服务器默认设置成了通过pxe启动，而且也顺利的通过pxe启动了，但之后会收到cobbler的引导菜单。如果默认没有任何选择的话，20秒后会使用local方式加载，也就是启动硬盘上的系统。</font></div></div><div><font face="微软雅黑"><br/></font></div></div></div><div><hr/></div><div><font face="微软雅黑">1.安装和配置 Cobbler </font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑">1.1 Cobbler 不在 CentOS 6.2 的基本源中，需要导入 EPEL 源。</font></div><div><font face="微软雅黑">官方链接：https://fedoraproject.org/wiki/EPEL</font></div><div align="left"><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">1.rpm -Uvh http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm</font></td></tr><tr><td valign="top"><font face="微软雅黑">2.yum install cobbler</font></td></tr></tbody></table><div><font face="微软雅黑">1.2 vi /etc/cobbler/settings.修改cobbler 服务器所在的 IP 地址，以及开启dhcp管理。</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">next_server: 本机IP</font></td></tr><tr><td valign="top"><font face="微软雅黑">server: 本机IP</font></td></tr><tr><td valign="top"><font face="微软雅黑">manage_dhcp: 1</font></td></tr></tbody></table><div><font face="微软雅黑">1.3 启动httpd、xinetd、cobblerd服务。</font></div></div><div><font face="微软雅黑">1.4 修改/etc/xinetd.d/rsync，/etc/xinetd.d/tftp，启动rsync和tftp。</font></div><div><font face="微软雅黑">1.5 安装配置DHCP服务并启动。</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">yum install dhcp</font></td></tr></tbody></table><div><font face="微软雅黑">修改配置文件/etc/cobbler/dhcp.template</font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">subnet 172.16.124.0 netmask 255.255.255.0等信息</font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><font face="微软雅黑">1.6 关闭防火墙和SElinux，重启。</font></div><div><hr/></div><div><font face="微软雅黑">2.检查和修改Cobbler配置</font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑">2.1 使用cobbler自带命令检查配置</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler check</font></td></tr></tbody></table><div><font face="微软雅黑">2.2 </font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler get-loaders</font></td></tr><tr><td valign="top"><font face="微软雅黑">yum install pykickstart</font></td></tr><tr><td valign="top"><font face="微软雅黑">yum install cman</font></td></tr><tr><td valign="top"><font face="微软雅黑">yum install debmirror</font></td></tr></tbody></table></div><div><font face="微软雅黑">2.3 修改/etc/debmirror.conf 配置文件，注释掉 @dists 和 @arches 两行</font></div><div><font face="微软雅黑">2.4 <font color="#FF0000">生成秘钥，替换/etc/cobbler/settings文件的default_password_crypted选项，此秘钥为系统初始化安装root密码。</font></font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">openssl passwd -1 -salt 'ty' 'delldell'</font></td></tr><tr><td valign="top"><font face="微软雅黑">default_password_crypted: &quot;$1$ty$bhan7aoyLHLn6n6uAOCa20&quot;</font></td></tr></tbody></table><div><font face="微软雅黑">2.5 <b style="color: rgb(44, 44, 44); line-height: 28px; padding: 0px; margin: 0px;"><font size="3" style="word-wrap: normal; word-break: normal; line-height: 24px; padding: 0px; margin: 0px;"><span style="word-wrap: normal; word-break: normal; padding: 0px; margin: 0px; font-weight: normal;">创建PXE菜单密码。</span></font></b></font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">openssl passwd -1 -salt 'ty' 'delldell'#生成秘钥</font></td></tr><tr><td valign="top"><font face="微软雅黑">MENU MASTER PASSWD $1$ty$bhan7aoyLHLn6n6uAOCa20 <font color="#FF0000">#/etc/cobbler/pxe/pxedefault.template文件添加</font></font></td></tr><tr><td valign="top"><font face="微软雅黑">MENU PASSWD <font color="#FF0000">#/etc/cobbler/pxe/pxeprofile.template文件添加</font></font></td></tr></tbody></table><div><font face="微软雅黑">2.6 <span style="line-height: 24px; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44);">定制</span><span lang="EN-US" style="line-height: 1.5; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44); word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;" xml:lang="EN-US">PXE</span><span style="line-height: 24px; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44);">菜单</span><span lang="EN-US" style="line-height: 1.5; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44); word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;" xml:lang="EN-US">TITLE。</span></font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">MENU TITLE Cobbler | TianYin's Cobbler power by zhonglin! <font color="#FF0000">#/etc/cob</font><span style="color: rgb(255, 0, 0);">bler/pxe/pxedefault.template文件添加</span></font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><font face="微软雅黑">2.7 同步配置。</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler sync</font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><hr/><font face="微软雅黑">3.导入系统。</font></div><div><font face="微软雅黑">3.1 挂载</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">mount -o loop -t iso9660 /usr/local/src/CentOS-6.2-x86_64-bin-DVD1.iso /mnt/Centos6.2/</font></td></tr></tbody></table><div><font face="微软雅黑">3.2 将挂载好的系统读取到cobbler内，过程比较长。</font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler import --path=/mnt/Centos6.2/ --name=CentOS-6.2-x86_64-bin-DVD1 --arch=x86_64</font></td></tr></tbody></table><div><font face="微软雅黑">3.3 查看配置</font></div></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler sync</font></td></tr><tr><td valign="top"><font face="微软雅黑">cobbler list</font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><hr/><font color="#FF0000" face="微软雅黑">4.<span style="background-color: rgb(255, 255, 255); line-height: 24px;">更改指定系统版本对应的ks配置文件</span></font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">cobbler profile edit --name=CentOS-6.2-bin-DVD1-x86_64    --kickstart=/var/lib/cobbler/kickstarts/CentOS-6.2-bin-DVD1-x86_64.ks</font></td></tr></tbody></table><div><font face="微软雅黑"><br/></font></div></div><div><font face="微软雅黑"><br/></font></div><div><hr/><font face="微软雅黑">5. 安装cobbler_web.</font></div><div><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">yum install cobbler-web -y</font></td></tr><tr><td valign="top"><font face="微软雅黑">htdigest /etc/cobbler/users.digest &quot;Cobbler&quot; cobbler #重置cobbler账号。</font></td></tr><tr><td valign="top"><font face="微软雅黑">htdigest /etc/cobbler/users.digest &quot;Cobbler&quot; your_newname #添加账号</font></td></tr><tr><td valign="top"><font face="微软雅黑">sed -i 's/authn_denyall/authn_configfile/g' /etc/cobbler/modules.conf #<span style="line-height: 24px; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44); text-align: left;">配置</span><span lang="EN-US" style="line-height: 1.5; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44); text-align: left; word-wrap: normal; word-break: normal; padding: 0px; margin: 0px;" xml:lang="EN-US">cobbler web</span><span style="line-height: 24px; background-color: rgb(255, 255, 255); color: rgb(44, 44, 44); text-align: left;">可以登录</span></font></td></tr><tr><td style="text-align: left;" valign="top"><font face="微软雅黑">/etc/init.d/cobblerd restart</font></td></tr><tr><td style="text-align: left;" valign="top"><font face="微软雅黑">/etc/init.d/httpd restart</font></td></tr></tbody></table><div><font face="微软雅黑">访问地址：<a href="https://172.16.124.130/cobbler_web">https://172.16.124.130/cobbler_web</a></font></div></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑">6. ks文件配置方法：</font></div><div><font face="微软雅黑">1.通过system-config-kickstart工具配置</font><table border="1" cellpadding="2" cellspacing="0" width="100%"><tbody><tr><td valign="top"><font face="微软雅黑">yum -y install system-config-kickstart</font></td></tr></tbody></table><div><font face="微软雅黑">2.在系统手动安装完成后,会在root目录下生成</font>anaconda-ks.cfg的文件.</div></div><div><br/></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><font face="微软雅黑"><br/></font></div><div><br/></div></div></div>
</div></body></html> 